<?php
/*********************/
/*                   */
/*  Version : 5.1.0  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/

/*
 * 最新店铺和明星店铺的取得
 */

require_once("collection.class.php");

class customerShopClass extends CollectionClass
{
    /**
     * 最新店铺取得
     *
     */
    public function getNewShop()
    {
        $db = new DataBase();
        $sql = $db->GetSql("shop_info","and if_del='0' and ischeck in ('1','3')","shop_id","practice_time desc");
        $result = $db->SelectLimit($sql,6,0);
        $shopIdList = array();
        foreach ($result as $k => $v) {
            $shopIdList[] = $v["shop_id"];
        }
        return $shopIdList;
    }
    
    /**
     * 明星店铺取得
     *
     */
    public function getStartShop()
    {
        $db = new DataBase();
        $sql = $db->GetSql("shop_info","and ischeck='3'","shop_id","practice_time desc");
        $result = $db->SelectLimit($sql,2,0);
        $shopIdList = array();
        foreach ($result as $k => $v) {
            $shopIdList[] = $v["shop_id"];
        }
        return $shopIdList;
    }
    
    /**
     * 热卖促销频道名取得
     *
     */
    public function getCXChannelName($page)
    {
        $db = new DataBase();
        $result = $db->GetList("and channel_temp_name = 'cuxiao.html'",$page,"channel");
        $CXChannelName = "";
        foreach ($result as $k => $v) {
            $CXChannelName = $v["channel_name"];
        }
        return $CXChannelName;
    }
}
?>